(load-plugin-in "bmacs")
(load-plugin-in "bmacs/bee")
(load-plugin-in "bmacs/bug")
(load-plugin-in "bmacs/cee")
(load-plugin-in "bmacs/dbg")
(load-plugin-in "bmacs/etc")
(load-plugin-in "bmacs/lee")
(load-plugin-in "bmacs/ude")


;;(if (locate-library "bmacs")
;;               (require 'bmacs))
(require 'bmacs)               
(autoload 'bdb "bdb" "bdb mode" t)
(autoload 'bee-mode "bee-mode" "bee mode" t)

;;(setq auto-mode-alist
;;      (append '(("\\.scm$" . bee-mode)
;;                ("\\.sch$" . bee-mode)
;;                ("\\.scme$" . bee-mode)
;;                ("\\.bgl$" . bee-mode)
;;                ("\\.bee$" . bee-mode))
;;              auto-mode-alist))

(setq auto-mode-alist
      (append '(("*.scm" . bee-mode)
                ("*.sch" . bee-mode)
                ("*.scme" . bee-mode)
                ("*.bgl" . bee-mode)
                ("*.bee" . bee-mode))
              auto-mode-alist))

(defun show-bee-repl()
  (interactive)
  (setq temp-buffer-name (buffer-name (current-buffer)))
  (show-output-window "*bigloo*")
  ;;(ude-repl-other-frame)
  (ude-repl-send-buffer)
  (switch-to-buffer-other-window temp-buffer-name)
  (show-output-window "*bigloo*" t))

(eval-after-load "bee-mode"
  '(progn
     (define-key bee-mode-map [f1] 'show-bee-repl)
     (define-key bee-mode-map (kbd "C-c C-z") 'show-bee-repl) ))

(provide 'mod-bigloo)              
